<template>
	<view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onLoad() {
			let queryString = window.location.href.split('?')[1];
			// 使用URLSearchParams解析
			let params = new URLSearchParams(queryString);
			let dataParam = params.get('data');
			// 解码URI组件并解析JSON
			let jsonData = JSON.parse(decodeURIComponent(dataParam));
			this.http.request("/api/Ordergoods/scanPjCode", 'POST', jsonData).then(res=>{
				this.http.toast(res.msg)
				setTimeout(()=>{
					uni.switchTab({
						url:"/pages/workbench/workbench"
					})
				},1000)
			})
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
